package com.tiger.admin.http.schoolDept;

import com.tiger.admin.Db;
import com.tiger.db.entity.SchoolDept;
import com.tiger.db.entity.TeacherDept;
import com.tiger.utils.ResponseUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController()
@RequestMapping("/schoolDept")
public class SchoolDeptController {
    private final Db db;

    public SchoolDeptController(Db db) {
        this.db = db;
    }

    @GetMapping("dept")
    public Object dept() {
        List<SchoolDept> rows = db.schoolDept.list();
        return ResponseUtil.successRes(rows);
    }
}
